import { ref } from "vue";

let defaultArr = [0, 1, 2];
export const arr = ref([...defaultArr]);
export const setArrDefault = () => {
    arr.value = [...defaultArr];
};
export const setLengthZero = () => {
    arr.value.length = 0;
};
export const arrHandle = (type) => {
    switch (type) {
        case "push":
            arr.value.push(1);
            break;
        case "RealPush":
            Array.prototype.push.call(arr.value, 1);
            break;
        case "pop":
            arr.value.pop();
            break;
        case "RealPop":
            Array.prototype.pop.call(arr.value);
            break;
        default:
            break;
    }
}